home *** CD-ROM | disk | FTP | other *** search
/ The Sunday Times: The Month 2003 December / The Sunday Times - The Month 2003-12.iso / pc / engine / shell / shell.swf / scripts / DefineSprite_62 / frame_1 / DoAction.as
Encoding:
Text File  |  2003-11-10  |  1.9 KB  |  96 lines

  1. function show()
  2. {
  3.    if(Tardis.PLAY_MODE != "browser")
  4.    {
  5.       gotoAndStop(5);
  6.    }
  7.    else
  8.    {
  9.       gotoAndStop(34);
  10.    }
  11.    Tardis.ChildLock.EB.addListener(this);
  12.    delete show;
  13. }
  14. function disable()
  15. {
  16.    gotoAndPlay(28);
  17.    mc_sponsor_button.button.enabled = false;
  18. }
  19. function childLockSet(val)
  20. {
  21.    if(val)
  22.    {
  23.       gotoAndStop(21);
  24.       mc_home_button.enabled = false;
  25.       mc_sponsor_button.button.enabled = false;
  26.    }
  27.    else
  28.    {
  29.       gotoAndStop(12);
  30.       mc_home_button.enabled = true;
  31.       mc_sponsor_button.button.enabled = true;
  32.    }
  33. }
  34. function buttonReset(name)
  35. {
  36.    this["mc_" + name].gotoAndStop("off");
  37. }
  38. function showOtherButtons()
  39. {
  40.    if(Tardis.PLAY_MODE != "browser")
  41.    {
  42.       gotoAndStop(12);
  43.    }
  44. }
  45. function sponsorButtonActivate()
  46. {
  47.    mc_sponsor_button.buttonRelease = function()
  48.    {
  49.       with(Tardis)
  50.       {
  51.          splash.interrupt();
  52.          bottomNav.disable();
  53.          transition.clrTint = parseInt("0x" + Settings.sponsor.overlayTint);
  54.          var strFile = Settings.sponsor.overlay;
  55.          trace("showAdvert(" + strFile + ")");
  56.          overlay.showAdvert(strFile);
  57.          UsageData.addAdvertEntry(-1);
  58.       }
  59.    };
  60.    mc_sponsor_button.button.enabled = true;
  61.    delete sponsorButtonActivate;
  62. }
  63. function sponsorButtonShow()
  64. {
  65.    mc_sponsor_button._visible = true;
  66. }
  67. function sponsorButtonHide()
  68. {
  69.    mc_sponsor_button._visible = false;
  70. }
  71. function homeButtonAnimate()
  72. {
  73.    mc_home_button.play();
  74.    delete homeButtonAnimate;
  75. }
  76. function homeButtonActivate()
  77. {
  78.    var clp = mc_home_button;
  79.    clp.play();
  80.    clp.onRelease = function()
  81.    {
  82.       Tardis.overlay.close();
  83.       Tardis.splashRestart();
  84.    };
  85.    clp.onRollOver = function()
  86.    {
  87.       this.gotoAndStop("still");
  88.    };
  89.    clp.onRollOut = function()
  90.    {
  91.       this.play();
  92.    };
  93.    delete homeButtonActivate;
  94. }
  95. stop();
  96.